<template>
  <div>
    <div>
      父组件：
      <div>
        <button @click="handleChange">修改</button>
      </div>
    </div>

    <hr>
    <PropsDefine :userList="userList"></PropsDefine>

    <SinglePropsUpdate></SinglePropsUpdate>
  </div>
</template>
<script setup lang="ts">
import type { PersonInter } from '@/types/demo.ts'
import PropsDefine from '@views/props/define/PropsDefine.vue'
import SinglePropsUpdate from '../single-props-update/index.vue'

const userList = ref<PersonInter[]>([
  { id: '1', name: '张三', age: 13 },
  { id: '2', name: '李四', age: 14 },
])

const handleChange = ()=>{
  userList.value[0].name = '赵五'
}
</script>

<style scoped></style>
